/*********************************************************************
	Rhapsody	: 7.5 
	Login		: kbe
	Component	: DefaultComponent 
	Configuration 	: CodeConfig
	Model Element	: Client
//!	Generated Date	: Thu, 27, Sep 2012  
	File Path	: DefaultComponent\CodeConfig\Client.h
*********************************************************************/

#ifndef Client_H
#define Client_H

//#[ ignore
#ifdef _MSC_VER
// disable Microsoft compiler warning (debug information truncated)
#pragma warning(disable: 4786)
#endif
//#]

//## auto_generated
#include <oxf\oxf.h>
//## auto_generated
#include "SOCK_WrapperFacade.h"
//## auto_generated
#include "Default.h"
//## auto_generated
#include <oxf\omreactive.h>
//## auto_generated
#include <oxf\state.h>
//## auto_generated
#include <oxf\event.h>
//## auto_generated
#include <string>
//## auto_generated
#include <algorithm>
//## dependency Alarm
class Alarm;

//## dependency Connector
template <class SERVICE_HANDLER, class IPC_CONNECTOR> class Connector;

//## dependency Log
class Log;

//## dependency Patient
class Patient;

//## link itsReactor
class Reactor;

//## package Default

//## class Client
class Client : public OMReactive {
    ////    Friends    ////
    
    ////    Constructors and destructors    ////
    
public :

    //## auto_generated
    Client(IOxfActive* theActiveContext = 0);
    
    //## auto_generated
    ~Client();
    
    ////    Operations    ////
    
    //## operation CreateConnector()
    void CreateConnector();
    
    //## operation Initialize()
    void Initialize();
    
    //## operation SimulateEvents()
    void SimulateEvents();
    
    ////    Additional operations    ////
    
    //## auto_generated
    Reactor* getItsReactor() const;
    
    //## auto_generated
    virtual bool startBehavior();

protected :

    //## auto_generated
    void initStatechart();
    
    //## auto_generated
    void cleanUpRelations();
    
    ////    Relations and components    ////
    
    Reactor* itsReactor;		//## link itsReactor
    
    ////    Framework operations    ////
    
    ////    Framework    ////

public :

    //## auto_generated
    Patient* getReqPatient() const;
    
    //## auto_generated
    void setReqPatient(Patient* p_reqPatient);

protected :

    Patient* reqPatient;		//## attribute reqPatient

public :

    // rootState:
    //## statechart_method
    inline bool rootState_IN() const;
    
    //## statechart_method
    virtual void rootState_entDef();
    
    //## statechart_method
    virtual IOxfReactive::TakeEventStatus rootState_processEvent();
    
    // Registered:
    //## statechart_method
    inline bool Registered_IN() const;
    
    // Idle:
    //## statechart_method
    inline bool Idle_IN() const;
    
    // Connected:
    //## statechart_method
    inline bool Connected_IN() const;

protected :

//#[ ignore
    enum Client_Enum {
        OMNonState = 0,
        Registered = 1,
        Idle = 2,
        Connected = 3
    };
    
    int rootState_subState;
    
    int rootState_active;
//#]
};

inline bool Client::rootState_IN() const {
    return true;
}

inline bool Client::Registered_IN() const {
    return rootState_subState == Registered;
}

inline bool Client::Idle_IN() const {
    return rootState_subState == Idle;
}

inline bool Client::Connected_IN() const {
    return rootState_subState == Connected;
}

#endif
/*********************************************************************
	File Path	: DefaultComponent\CodeConfig\Client.h
*********************************************************************/
